﻿/**************************************************************
 * Description:
 * PRChangeDocTypeBListUIModelAction.cs
 * Product: U9
 * Co.    : UFIDA Group
 * Author : Auto Generated
 * version: 2.0
 **************************************************************/
using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using UFSoft.UBF.Util.Log;
using UFSoft.UBF.UI.MD.Runtime;
using UFSoft.UBF.UI.ActionProcess;
using UFSoft.UBF.UI.IView; 
using System.Data;
using UFIDA.UBF.Query.CommonService;
using UFSoft.UBF.UI.FormProcess;
using UFSoft.UBF.UI.ControlModel;
using UFIDA.UBF.Query.CommonService.QueryStrategy;
using UFIDA.UBF.Query.CaseModel;
using UFIDA.U9.UI.PDHelper;
using UFSoft.UBF.ExportService;

namespace PRChangeDocTypeBListUIModel
{
	public partial class PRChangeDocTypeBListUIModelAction : BaseAction
	{
		private static readonly ILogger logger = LoggerManager.GetLogger(typeof(PRChangeDocTypeBListUIModelAction));
		//强类型化基类Model属性.
		public new PRChangeDocTypeBListUIModelModel CurrentModel 
		{
			get {
				return (PRChangeDocTypeBListUIModelModel)base.CurrentModel;
			}
			set {
				base.CurrentModel = value ;
			}
		}
		
		public PRChangeDocTypeBListUIModelAction(IPart part) : base(part)
		{
		}
		//Model参数的构造,用于测试用例.
		public PRChangeDocTypeBListUIModelAction(PRChangeDocTypeBListUIModelModel model) : base(model)
		{
		}
		/// <summary>
		/// Help: 
		/// </summary>
		public void OnLookCase(object sender, UIActionEventArgs e)
		{
			//调用基类委托..
			this.InvokeAction(sender,e,this.OnLookCase_Extend);
		}
		private void OnLookCase_DefaultImpl(object sender, UIActionEventArgs e)
		{
	  
	 
			//加入{action.Name}的代码模版:.\UITpls\UICommonAction.tpl,参数:QryClick
            UFIDA.U9.UI.Commands.CommandFactory.DoCommand("QryClick",this,sender,e);

	  
		}
		/// <summary>
		/// Help: 
		/// </summary>
		public void OnCaseChanged(object sender, UIActionEventArgs e)
		{
			//调用基类委托..
			this.InvokeAction(sender,e,this.OnCaseChanged_Extend);
		}
		private void OnCaseChanged_DefaultImpl(object sender, UIActionEventArgs e)
		{
	  
	        QryService.OnCaseChangedDefault("DDLCase", this.CurrentPart);
		QueryAdjust();
	 

		}
		/// <summary>
		/// Help: 
		/// </summary>
		public void OnOutPut(object sender, UIActionEventArgs e)
		{
			//调用基类委托..
			this.InvokeAction(sender,e,this.OnOutPut_Extend);
		}
		private void OnOutPut_DefaultImpl(object sender, UIActionEventArgs e)
		{
	  
	 
			//加入{action.Name}的代码模版:.\UITpls\UICommonAction.tpl,参数:OnOutPut
            UFIDA.U9.UI.Commands.CommandFactory.DoCommand("OnOutPut",this,sender,e);

	  
		}
		/// <summary>
		/// Help: 
		/// </summary>
		public void OnGridRowDbClick(object sender, UIActionEventArgs e)
		{
			//调用基类委托..
			this.InvokeAction(sender,e,this.OnGridRowDbClick_Extend);
		}
		private void OnGridRowDbClick_DefaultImpl(object sender, UIActionEventArgs e)
		{
	  
	 

		}
		/// <summary>
		/// Help: 
		/// </summary>
		public void OnNew(object sender, UIActionEventArgs e)
		{
			//调用基类委托..
			this.InvokeAction(sender,e,this.OnNew_Extend);
		}
		private void OnNew_DefaultImpl(object sender, UIActionEventArgs e)
		{
	  
	 

		}
		/// <summary>
		/// Help: 
		/// </summary>
		public void OnPrint(object sender, UIActionEventArgs e)
		{
			//调用基类委托..
			this.InvokeAction(sender,e,this.OnPrint_Extend);
		}
		private void OnPrint_DefaultImpl(object sender, UIActionEventArgs e)
		{
	  
	 
			//加入{action.Name}的代码模版:.\UITpls\UICommonAction.tpl,参数:OnPrint
            UFIDA.U9.UI.Commands.CommandFactory.DoCommand("OnPrint",this,sender,e);

	  
		}
		/// <summary>
		/// Help: 
		/// </summary>
		public void OnDelete(object sender, UIActionEventArgs e)
		{
			//调用基类委托..
			this.InvokeAction(sender,e,this.OnDelete_Extend);
		}
		private void OnDelete_DefaultImpl(object sender, UIActionEventArgs e)
		{
	  
	 
			//加入{action.Name}的代码模版:.\UITpls\UICommonAction.tpl,参数:ListDeleteClick
            UFIDA.U9.UI.Commands.CommandFactory.DoCommand("ListDeleteClick",this,sender,e);

	  
		}
		#region Action的内置两个Action.
		/// <summary>
		/// Help: 数据加载(发生在Form的初始化加载时)
		/// </summary>
		public void OnLoadData(object sender, UIActionEventArgs e)
		{
			//UBF扩展处...
			this.OnLoadData_Extend(sender,e) ;
		}
		private void OnLoadData_DefaultImpl(object sender, UIActionEventArgs e)
		{
		   
		     InitCaseModel();
				}
		/// <summary>
		/// Help: 数据收集(发生在Form的CallBack或者是PostBack时)
		/// </summary>
		public void OnDataCollect(object sender, UIActionEventArgs e)
		{
			//UBF扩展处...
			this.OnDataCollect_Extend(sender,e) ;
		}
		private void OnDataCollect_DefaultImpl(object sender, UIActionEventArgs e)
		{
		    UFIDA.U9.UI.Commands.CommandFactory.DoCommand("DataCollect",this,sender,e);
		}
		#endregion
         

            
        #region BE列表自动产生的代码
        
		public void QueryAdjust()
		{
			IUFDataGrid UIGrid = this.CurrentPart.GetUFControlByName(this.CurrentPart.TopLevelContainer, "DataGrid1") as IUFDataGrid;

			BEQueryStrategyImpl beQryStrategyImpl = new BEQueryStrategyImpl(this.CurrentState, "UFIDA.U9.Cust.OTD.ZF.SHXM3003.OTDBE.PRChangeTypeBE.PRChangeDocType", "83742252-5a7c-4fce-b6dc-0085e2f68e1a", UIGrid.UIView, UIGrid, 1);

			beQryStrategyImpl.Adjust();
		    
			AfterQryAdjust_Extend(UIGrid);

			UIGrid.UIView.CurrentFilter.OPath = CustomFilterOpath_Extend(QryService.GetDefaultOpath((BaseWebForm)(this.CurrentPart)));
			UIGrid.UIView.CurrentFilter.OrderBy = QryService.GetOrderByOpath((BaseWebForm)(this.CurrentPart));

			UIGrid.UIView.Clear();
			this.NavigateAction.FirstPage(null);

			//20090316 UBF2.9_查询_yzx_修改查询设计器的tpl_用于显示多webpart查询的IE状态栏提示信息
			QryService.ShowQueryInfoInIEStatusBar((BaseWebForm)this.CurrentPart, UIGrid.UIView);
		}

		public void InitCaseModel()
		{
			QryService.ClearSession((UFSoft.UBF.UI.FormProcess.BaseWebForm)(this.CurrentPart));
			IUFDataGrid UIGrid = this.CurrentPart.GetUFControlByName(this.CurrentPart.TopLevelContainer, "DataGrid1") as IUFDataGrid;
			BEQueryStrategyImpl beQryStrategyImpl = new BEQueryStrategyImpl(this.CurrentState, "UFIDA.U9.Cust.OTD.ZF.SHXM3003.OTDBE.PRChangeTypeBE.PRChangeDocType", "83742252-5a7c-4fce-b6dc-0085e2f68e1a", UIGrid.UIView, UIGrid, 1);
			beQryStrategyImpl.QueryComponentXMLCompressed = @"7VU7bxtHEFaaNCnyF4jrl9rn3S4gyrBICyYgR4xICkG6fcxKTI53zPFoi53TuRHkJnaRJl06I0WQ
IIqB/JlISor8hmSPFPWgH1CAdOE0tzP7+Ga+/WZv7YO1tbW/g1Xfyj6sBn99vHHvaJjWHkMxHuRZ
IyJ1HNUgs7kbZAeNaFJ6JKN7mxufTqCYNvPhKM8gK2sD14gYkNgLZRBwqRAXmiNtiUbMO2CYGwvM
RLVMD6ERdfaahzo7gFZue9MR7AzGZVRzg/Eo1dNP3rMCxrYYjMpZalHtENJR9Z0lU61qRPN1s0B/
r92IJEs4pYIioROLuLeATOwswlgKoD6WQPTl+m4+KSxsT9J0nkF/u926X++renMyLuu7vVb98+16
9+FnjxjGrPK3HtQXWVbgN9zLpKNav70/gCetQh/M06tGrfxJFtX2wLczn+/k2s2nmtoeQrS5saXH
A1tNzUgVVlLNgKKEa4y4UgkyoSbEqTVAgYgE2ILUJQbfSVeA7uVfwiy2l+dlKyxr5lkJR+W+Tiez
rduDtISip83+YDwwaYj1ikkoqJmnk2H2ZrybF+Wb0fkpD45GOnM78BjSoJLFGcvR6oTl2Hqgo3PJ
1KXGDIs1xsgkmCOulUMarEckJglAoi338t/S0SnyL8CW7dYNp6PLw8rd6rRLGM6ntjq7Iyh0tX0e
aPV2FzP3D0IXtNL0hhdOOppWfiii375ZhDPCSS8pUjwOmgTmkUrCFVtDqWSUKKzwf1lEv/0od5Au
KgEqlWVSIsaMD0LSQVKYKsSwtZ4qoNrNlLudF8PFHoaVk+AUMoIE8TErkfLaIE6UNyZRjKr4Gihs
kNoQwRlDDmTYIMAhiQlG1DGlJOhYxn5GTQu8nqRlU4/h2pkJZLy5MR/MSDNcU8YSQMRShzgnEslY
4pCGU5pwrRVLFqQ1C9AluN1sib2zZ9+e/Xp6/vKnP1/++E4m12/BgiAixsQiABLIktIhRbVFmmNM
ifeGgFmC3Zq+Ffb309M7YlJjKIEkiFyBDBQLCJjCIWdIwojSoGK+wAwvzUMIF1Z04atJeKehW05T
WE7g+Jvz41cXr1+cnfx8/uKXs9cnd8yEeRXHUupw7UGu3DqNlMZBBdpgobAQPnZX1eduGTcgXnz3
9R2xBNGJ8MwiakVobalFaG1qkLAuSJQSQvFVa1fHL9f4/Pji+x/uWpfFKhGCIM9k6ECpPNJJYpA0
hLmEE+2BLLC6h+FhegvgxaundwckSliScEDh3xNkZA0J7RDELDBIH2MfyrNXV3p94BLk+cnJH7+9
F3J9uYPWb/XX+u3f9uZHaytb2cpWtrKVrex/ZP8A";
		    
			BeforeGetQryModel_Extend(beQryStrategyImpl);
		    
			CaseModel caseModel = beQryStrategyImpl.GetQryModel();
		    
			AfterGetQueryModel_Extend(caseModel);
		    
			QryService.SetCaseModelToSession((BaseWebForm)(this.CurrentPart), caseModel);
		}
        
        
         #endregion
         

	}
}
